package org.jeecg.modules.business.repertory.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.business.repertory.entity.WmsRepertory;
import org.jeecg.modules.business.repertory.entity.dto.CountQuantityDTO;
import org.jeecg.modules.business.repertory.entity.vo.RepertoryVO;
import org.jeecg.modules.business.repertory.entity.vo.param.RepertoryParamVO;
import org.jeecg.modules.business.strategy.entity.InReceiptStrategyParam;
import org.jeecg.modules.dock.entity.mes.request.RepertoryRequestParam;
import org.jeecg.modules.dock.entity.mes.response.RepertoryToMesVO;

import java.util.List;

/**
 * @Description: 库存
 * @Author: jeecg-boot
 * @Date: 2023-07-31
 * @Version: V1.0
 */
public interface WmsRepertoryMapper extends BaseMapper<WmsRepertory> {

    /**
     * 统计物料在仓库中数量
     *
     * @return
     */
    List<CountQuantityDTO> countWarehouse();

    /**
     * 统计物料在库区中数量
     *
     * @return
     */
    List<CountQuantityDTO> countArea();

    /**
     * 统计物料在库位中数量
     *
     * @return
     */
    List<CountQuantityDTO> countLocation();
    IPage<RepertoryVO> getPage(@Param("page")Page<RepertoryVO> page,@Param("vo") RepertoryParamVO vo);

    /**
     * 不排除逻辑删除查询库存
     *
     * @return
     */
    List<WmsRepertory> listRepertory(List<String> ids);

    /**
     * 不排除逻辑删除查询纵剪叫料
     *
     * @return
     */
    List<WmsRepertory> listByBatchCode(@Param("vo") InReceiptStrategyParam vo);

    List<RepertoryToMesVO> getLocation(@Param("param")RepertoryRequestParam param);

}
